package com.gdzn.netty.api.thread;

import com.google.common.util.concurrent.ThreadFactoryBuilder;

import java.util.concurrent.*;

/**
 * Create By IntelliJ IDEA
 *
 * @author cxz kenny
 * @date 2021-10-15
 */
public class MsgFixThreadPool {
    public static ExecutorService executorService;

    static {
        ThreadFactory threadFactory = new ThreadFactoryBuilder()
                .setNameFormat("MsgFixThreadPool-%d").build();

        executorService = new ThreadPoolExecutor(5, 20, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingDeque<>(1024), threadFactory);
    }
}
